Known in the art is a technique for calculating an attitude of a device by use of an angular rate sensor and an accelerometer.
A program according to an exemplary embodiment, which is executed by a display device comprising an angular rate sensor and an accelerometer, causes the display device to execute a process, the process comprising: calculating a first attitude of the display device based on an angular rate detected by the angular rate sensor; correcting the first attitude to calculate a second attitude, based on an acceleration detected by the accelerometer and a rotation amount per predetermined time of the display device; generating an image according to the second attitude; and causing the display device to display the image.